for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
turn = 0 if n % 2 == 1:
print("Mike")
continue
else:
min_a = min(a)
for i in range(len(a)):
if a[i] == min_a:
if i % 2 == 0:
print("Joe")
break
else:
print("Mike")
break
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
ll a[n];
for(ll i=0;i<n;i++)
cin>>a[i];
if(n%2!=0)
cout<<"Mike"<<endl;
else {
ll mn_mike=INT_MAX,index_mike,index_joe,mn_joe=INT_MAX;
for(ll i=0;i<n;i++)
{
if(i%2==0 && mn_mike>a[i])
{
//mn_mike=min(mn_mike,a[i]);
mn_mike=a[i];
index_mike=i;
}
if(i%2==1 && mn_joe>a[i]) {
// mn_joe=min(mn_joe,a[i]);
mn_joe=a[i];
index_joe=i;
}
}
if(mn_mike!=mn_joe)
{
if(mn_mike>mn_joe)
cout<<"Mike"<<endl;
else cout<<"Joe"<<endl;
}
else {
if(index_mike>index_joe)
cout<<"Mike"<<endl;
else cout<<"Joe"<<endl;
}
}
}
return 0;
}
Health of a person | Divisibility |
A. Movement | Numbers in a matrix |
Sequences | Split houses |
Divisible | Three primes |
Coprimes | Cost of balloons |
One String No Trouble | Help Jarvis! |
Lift queries | Goki and his breakup |
Ali and Helping innocent people | Book of Potion making |
Duration | Birthday Party |
e-maze-in | Bricks Game |
Char Sum | Two Strings |
Anagrams | Prime Number |
Lexical Sorting Reloaded | 1514A - Perfectly Imperfect Array |
580A- Kefa and First Steps | 1472B- Fair Division |
996A - Hit the Lottery | MSNSADM1 Football |